<!DOCTYPE html>
<html>
<head>
  <title><%= site_name %></title>
  <link rel="shortcut icon" href="/assets/favicon.ico" />

  <%= stylesheet_link_tag 'sprite.css' %>
  <%= stylesheet_link_tag "normalize.css" %>
  <%= stylesheet_link_tag "application.css" %>
  <%= stylesheet_link_tag 'admin/app.css' %>
    <!--[if lt IE 8]
  <%#= stylesheet_link_tag 'ie.css', :media => 'screen, projection'%>
  <![endif]-->
  <%= csrf_meta_tag %>

  <%= javascript_include_tag 'application' %>
  <%#= javascript_include_tag "admin/app" %>
  <%#= javascript_include_tag "admin/jquery.customforms" %>
  <%#= javascript_include_tag "admin/jquery.placeholder.min" %>
  <%#= javascript_include_tag "admin/jquery.reveal" %>
  <%#= javascript_include_tag "admin/jquery.tooltips" %>
  <%#= javascript_include_tag "admin/modernizr.foundation" %>

  <%= yield :head %>
</head>
<body class="bp">
  <% if notice || alert %>
      <div class="flash_notice callout <%= !!alert ? 'alert' : 'warning' %>" data-closable>
        <div>
        <% if alert %>
          <%= alert %>
        <% elsif notice %>
          <%= notice %>
        <% end %>
        </div>
        <button class="close-button" aria-label="Close alert" type="button"  data-close>
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
  <% end %>

  <div class="container row">
    <%= render partial: 'shared/admin/header_bar' %>
  </div>
  <div class="container bp">

    <% if  content_for? :header_sub_bar %>
      <div id='header_sub_bar'>
        <%= yield :header_sub_bar %>
      </div>
    <% end %>

  </div>

  <div class="container" style='width:1080px;'>
    <div class=" content last" style='width:1080px;'>
      <div class=" column" style='<%= 'width:530px;' if  content_for? :sidebar %>'>
        <%= yield %>
      </div>
      <% if  content_for? :sidebar %>
        <%= yield :sidebar %>
      <% end %>
    </div>
  </div>

  <%= yield :bottom %>

  <script>
  jQuery(window).ready(
    function() {
      jQuery('.flash_notice').delay(6000).slideUp( 'slow');
      jQuery('.flash_error').delay(6000).slideUp( 'slow');
    }
  );
  </script>

</body>
  <%= yield :below_body %>
</html>
